<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('加油记录列表')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            

            <div class="col-sm-12 select-table table-striped">
               <div class="ibox float-e-margins" >
					<div class="ibox-title">
						<h5>统计分析</h5>
					</div>
					<div class="ibox-content">
						<div class="echarts" style="height: 600px" id="echarts-bar-chart0"></div>
					</div>
				</div>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: echarts-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
    var names0 = [[${names}]]
    var values0 = [[${values}]]
    $(function () {
    	var pipeChart0 = echarts.init(document.getElementById("echarts-bar-chart0"));
    	option0 = {
    			title: {
    		        text: '答卷人数'
    		    },
    			legend: {
  		            data:['答卷人数']
  		        },
    		    tooltip: {},
    		    calculable: true,
    	    xAxis: {
    	        type: 'category',
    	        data: names0
    	    },
    	    yAxis: {
    	        type: 'value'
    	    },
    	    series: [{
    	        data:values0,
    	        type: 'bar',
    	        showBackground: true,
    	        backgroundStyle: {
    	            color: 'rgba(220, 220, 220, 0.8)'
    	        },
    		    markPoint: {
    	            data: [
    	                {type: 'max', name: '最大值'},
    	                {type: 'min', name: '最小值'}
    	            ]
    	        },
    	        markLine: {
    	            data: [
    	                {type: 'average', name: '平均值'}
    	            ]
    	        }
    	    }]
    	};
    	pipeChart0.setOption(option0);
         window.onresize = pipeChart0.resize;
         

 	     
    }) 

    </script>
</body>
</html>